package com.myjsf.bean.user;

public class UserBean {
	private String name;
	private String password;
	private String errorMessage;

	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	public String getErrorMessage() {
		return errorMessage;
	}
	public void setErrorMessage(String errorMessage) {
		this.errorMessage = errorMessage;
	}
	
	public String validate(){
		if(name.equals("LUOTUO") && password.equals("123456")){
			return "success";
		}
		else{
			setErrorMessage("userName or passWord is wrong, please login again");
			return "failure";
		}
	}
}
